<!--************************************************************************************************-->
<!-- < addFriendResult.php >                                                                           -->
<!-- Copyright (c) 2012-2013 San Yat-sun University School of Software                              -->
<!-- Founder : Tianjiao Li                                                                          -->
<!-- Stu : 10389129                                                                                 -->
<!-- Date: 2012-12-18                                                                               -->
<!-- Destription : Add Friend Result.                                                         -->
<!-- Basic: User:root                                                                               -->
<!--	    Password:                                                                               -->
<!-- Version : 2.1                                                                                  -->
<!-- LastUpdate : 2012-12-23 16:00 BY Tianjiaoli                                                    -->
<!--************************************************************************************************-->

<?php
	session_start();
?>

<?php
	//include_once("../persistent/SqlOperate.php");
	include_once("../manager/FriendManager.php");
	
	// ================��ǰ̨�?��ƺ���ݿ����=====================
	if( isset($_POST['username'])) 
	{
		$UsernameA = $_SESSION['currentUser'];
		$UsernameB = $_POST['username'];
		$data = array('UsernameA'=>$UsernameA, 'UsernameB'=>$UsernameB);
		
		FriendManager::getInstance()->insert($data);
		//====================================================
	}
	else
	{
		echo "Error: ".mysql_error();
	}
?>

<html lang="zh-hk">	
	<head>
		<title>TINY bOOk</title>
		<meta http-equiv="Content-Type" content="text/html charset=UTF-8">
		<meta name="contentType" value="text/html  charset=GBK">
		<meta name="description" content="在这里你可以看到最新发布的书籍，和好友共享对某本书的评论和笔记">
		<meta http-equiv="imagetoolbar" content="no">
		<meta name="viewport" content="width=1036">
		
		<link rel="stylesheet" type="text/css" href="../css/result.css"/>
		<link rel="shortcut icon" href="images/shortcut.jpg"/>
		<meta http-equiv="refresh" content="1; url=myPage.php">
	</head>	
		
	<body>
		<div id="title">
			<h1>TINY bOOk</h1>
		</div>
		<div id="welcome">
			<h2>欢迎成为TINY bOOk的成员</h2>
		</div>

		<div id="hasRegister">
			<p>已注册，跳转到个人页面</a></p>
		</div>
	</body>
</html>
	